package com.ithiema.a02myfunction;

import java.util.ArrayList;
import java.util.Collections;

public class FunctionDemo3 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Collections.addAll(list, 1,2,3,4,5);

        Integer[] array = list.stream().toArray(Integer[]::new);
        for (Integer i : array) {
            System.out.println(i);
        }
    }}
